import defaultImg from '@/components/defaultImg/defaultImg.vue' //默认图片组件
export default {
  components: {
    defaultImg,
  },
  data() {
    return {
      defaultImg: false, //默认图
      carnumber: 0,
      current: -1,
      // isAddCar: true, //是否选择添加车辆按钮
      pageLoading: false, //初始化加载效果
    }
  },

  computed: {
    mycarlist() {
      return this.$store.state.afterSales.carLists
    },
  },

  onLoad(e) {
    // this.isAddCar = e.isAddCar ? Boolean(e.isAddCar) : true
    // console.log(this.isAddCar)
    this.$nextTick(() => {
      this.pageLoading = true
    })
  },

  methods: {
    //添加车辆
    addCar() {
      uni.redirectTo({
        url: '/pages_afterSales/addYourCar/addYourCar',
      })
    },

    //我的爱车信息
    mycarinf(e) {
      uni.$emit('selCar', this.mycarlist[e.detail.value])
      uni.navigateBack()
    },
  },
}
